package com.jbm.jsm.iface;

import com.jbm.core.iface.IAcross;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import javax.persistence.*;
import java.math.BigDecimal;
import java.sql.Timestamp;
import java.util.List;

/**
 * Created by Administrator on 2017/9/26.
 */
@Entity
@Table(name = "deposit_log", schema = "", catalog = "jsm")
@org.hibernate.annotations.Entity(dynamicUpdate=true,dynamicInsert=true)
@org.hibernate.annotations.Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class DepositLogEntity extends IAcross
{
    private int id;
    private Integer userId;
    private Integer mainId;
    private String type;
    private BigDecimal amount;
    private BigDecimal blance;
    private String memo;
    private Integer consumeType;
    private Integer status;
    private Integer createId;
    private Timestamp createDate;
    private BigDecimal moneyamount;
    private BigDecimal serviceCharge;
    private String pay_code_3rd;
    String consumeTypeCn;
    public List<DepositLogEntity> logList;
    public String startDate;
    public String endDate;


    public DepositLogEntity()
    {
        super();
    }

    public DepositLogEntity(IAcross ia)
    {
        super(ia);
    }

    @Id
    @Column(name = "id")
    @GeneratedValue
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Basic
    @Column(name = "user_id")
    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        DepositLogEntity that = (DepositLogEntity) o;

        if (id != that.id) return false;
        if (userId != null ? !userId.equals(that.userId) : that.userId != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id;
        result = 31 * result + (userId != null ? userId.hashCode() : 0);
        return result;
    }

    @Basic
    @Column(name = "main_id")
    public Integer getMainId() {
        return mainId;
    }

    public void setMainId(Integer mainId) {
        this.mainId = mainId;
    }

    @Basic
    @Column(name = "type")
    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    @Basic
    @Column(name = "amount")
    public BigDecimal getAmount() {
        return amount;
    }

    public void setAmount(BigDecimal amount) {
        this.amount = amount;
    }

    @Basic
    @Column(name = "blance")
    public BigDecimal getBlance() {
        return blance;
    }

    public void setBlance(BigDecimal blance) {
        this.blance = blance;
    }

    @Basic
    @Column(name = "memo")
    public String getMemo() {
        return memo;
    }

    public void setMemo(String memo) {
        this.memo = memo;
    }

    @Basic
    @Column(name = "consume_type")
    public Integer getConsumeType() {
        return consumeType;
    }

    public void setConsumeType(Integer consumeType) {
        this.consumeType = consumeType;
    }

    @Basic
    @Column(name = "status")
    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    @Basic
    @Column(name = "create_id")
    public Integer getCreateId() {
        return createId;
    }

    public void setCreateId(Integer createId) {
        this.createId = createId;
    }

    @Basic
    @Column(name = "create_date")
    public Timestamp getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Timestamp createDate) {
        this.createDate = createDate;
    }

    @Basic
    @Column(name = "moneyamount")
    public BigDecimal getMoneyamount() {
        return moneyamount;
    }

    public void setMoneyamount(BigDecimal moneyamount) {
        this.moneyamount = moneyamount;
    }

    @Basic
    @Column(name = "service_charge")
    public BigDecimal getServiceCharge() {
        return serviceCharge;
    }

    public void setServiceCharge(BigDecimal serviceCharge) { this.serviceCharge = serviceCharge; }

    @Basic
    @Column(name = "pay_code_3rd")
    public String getPayCode3rd() {
        return pay_code_3rd;
    }

    public void setPayCode3rd(String pay_code_3rd) {
        this.pay_code_3rd = pay_code_3rd;
    }

    @Transient
    public String getConsumeTypeCn() {
        return consumeTypeCn;
    }

    public void setConsumeTypeCn(String consumeTypeCn) {
        this.consumeTypeCn = consumeTypeCn;
    }

    @Transient
    public List<DepositLogEntity> getLogList() {
        return logList;
    }

    public void setLogList(List<DepositLogEntity> logList) {
        this.logList = logList;
    }

    @Transient
    public String getStartDate() {
        return startDate;
    }

    public void setStartDate(String startDate) {
        this.startDate = startDate;
    }

    @Transient
    public String getEndDate() {
        return endDate;
    }

    public void setEndDate(String endDate) {
        this.endDate = endDate;
    }

}
